import Vue from 'vue';
import Vuex from 'vuex';

import * as getters from './getters'
import * as actions from './actions'
import * as mutations from './mutations'

Vue.use(Vuex);

const state = {
    isLogin:false, // 是否登录
    token:null, // 用户令牌
    userInfo:null,
}

const store = new Vuex.Store({
    state,      // 全局状态
    getters,    // 获取数据 
    actions,    // 异步操作
    mutations   // 处理数据
});
 
export default store;